﻿<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"    %>
<script runat="server">
   
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.Title = Resources.faContent.activationHeaderTitle;
   
        
        if (Request.QueryString["id"] != null)
        {
            MembershipUser user;
            try
            {
                Guid id = new Guid(Request.QueryString["id"].ToString());
                user = Membership.GetUser(id);
                if (user != null)
                {
                    user.IsApproved = true;
                    Membership.UpdateUser(user);
                    pSuccess.Visible = true;
                    lSucNote.Text = Resources.faContent.activationSuccessMsg;
                }
            }
            catch (Exception ex)
            {
                pFail.Visible = true;
                lFailNote.Text = Resources.faContent.activationFailMsg;
            }

        }
        else
        {
            pFail.Visible = true;
            lFailNote.Text = Resources.faContent.activationFailMsg;
        }
    }

</script>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <center>
   <asp:Panel runat="server" ID="pSuccess" Visible="false">
    <div class="suc">    
     <img src="App_Themes/Default/Images/ActionSuccess.png" alt="" />
      <asp:Literal runat="server" ID="lSucNote" />
    </div>
   </asp:Panel>
   <asp:Panel runat="server" ID="pFail" Visible="false">
    <div class="fail">    
     <img src="App_Themes/Default/Images/ActionFail.png" alt="" />
      <asp:Literal runat="server" ID="lFailNote" />
    </div>
   </asp:Panel>
  </center>
</asp:Content>

